window: Use update_window_buttons to hide title on fullscreen
authorRob Bradford <rob@linux.intel.com>
Tue, 19 Mar 2013 19:40:30 +0000 (19:40 +0000)
committerRob Bradford <rob@linux.intel.com>
Tue, 19 Mar 2013 19:48:35 +0000 (19:48 +0000)
The function update_window_buttons shows or hides the title header after it
has finished updating the visibility of the various buttons. Unfortunately
this
conflicted with the hiding of the title done when going fullscreen.

This solves the problem and fixes the rendering of fullscreen applications by
using update_window_buttons to control the visibility of the box in the
fullscreen case.

gtk/gtkwindow.c

index 21d469725e37f85a52b287d2385469e2c5058b66..712721010c54576b8832d861e500c7415a7d48fa 100644 (file)
@@ -4997,6 +4997,7 @@ update_window_buttons (GtkWindow *window)
 
   if (priv->decorated &&
       priv->client_decorated &&
+      !priv->fullscreen &&
       priv->title_box != NULL)
     {
       gchar *layout_desc;
@@ -6260,8 +6261,6 @@ gtk_window_state_event (GtkWidget           *widget,
     {
       priv->fullscreen =
         (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) ? 1 : 0;
-      if (priv->title_box)
-        gtk_widget_set_visible (priv->title_box, !priv->fullscreen);
     }
 
   if (event->changed_mask & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED))